improved user defaults
authorjfatherton <jfatherton@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 3 Feb 2004 05:06:09 +0000 (05:06 +0000)
committerjfatherton <jfatherton@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 3 Feb 2004 05:06:09 +0000 (05:06 +0000)
gpsbabel/macgpsbabel/English.lproj/MainMenu.nib/info.nib
gpsbabel/macgpsbabel/English.lproj/MainMenu.nib/objects.nib
gpsbabel/macgpsbabel/MacGPSBabel.applescript
gpsbabel/macgpsbabel/MacGPSBabel.pbproj/jeremya.pbxuser
gpsbabel/macgpsbabel/preferences.applescript

index d4ab31fd7e9c9c647f0982393cea82540266bf47..bfc648b67ef4e09138435449a9b4eb76e21b2444 100644 (file)
        <string>283.0</string>
        <key>IBOpenObjects</key>
        <array>
-               <integer>29</integer>
-               <integer>305</integer>
                <integer>21</integer>
                <integer>229</integer>
+               <integer>29</integer>
+               <integer>305</integer>
        </array>
        <key>IBSystem Version</key>
        <string>6R73</string>
index 619c94cbb66893e5f7cae0685a69ba25b1885f56..7ced0413a4e1ad290131c4dfeb34fa0b3875f9de 100644 (file)
Binary files a/gpsbabel/macgpsbabel/English.lproj/MainMenu.nib/objects.nib and b/gpsbabel/macgpsbabel/English.lproj/MainMenu.nib/objects.nib differ
index 95763957c699873412f6b15657f0d777aafe058a..f5b5feb7f5bbc812cc617b299235092e4d057abb 100644 (file)
@@ -3,7 +3,7 @@
 
 --  Created by Jeremy Atherton on Sun Sep 28 2003.
 --  Last modified Saturday, January 31, 2004.
---  Copyright (c) 2003, 2004 Jeremy Atherton. All rights reserved.
+--  Copyright (c) 2003, 2004 Jeremy Atherton.
 
 -- PROPERTIES AND GLOBALS --
 property fileList : {}
@@ -23,31 +23,16 @@ on awake from nib theObject
        end if
 end awake from nib
 
--- scripts to deal with opening and closing of SelectGPS window
 on will open theObject
        if theObject is window "MacGPSBabel" then
                set p to progress indicator 1 of theObject
                call method "setStyle:" of p with parameter 1
                call method "setDisplayedWhenStopped:" of p with parameters {false}
        end if
-       if theObject is window "SelectGPS" then
-               set popList to my getSerial()
-               delete every menu item of menu of popup button "serialPop" of window "SelectGPS"
-               repeat with i in popList
-                       make new menu item at the end of menu items of menu of popup button "serialPop" of window "SelectGPS" with properties {title:i, enabled:true}
-               end repeat
-               set visible of window "MacGPSBabel" to false
-       end if
 end will open
-on will close theObject
-       if theObject is window "SelectGPS" then
-               set visible of window "MacGPSBabel" to true
-       end if
-end will close
 
 -- the 'buisness' scripts, for dealing with all button clicks
 on clicked theObject
-       
        -- MAIN WINDOW - Select File button
        if theObject is the button "selectButton" of window "MacGPSBabel" then
                if contents of text field "inputFile" of window "MacGPSBabel" is equal to "" then
@@ -316,25 +301,6 @@ on GPSSend()
                set enabled of button "trackSwitch" of window "selectGPS" to true
        end if
 end GPSSend
--- find the serial ports
-on getSerial()
-       set myList to {}
-       set theScript to "cd /dev; ls | grep cu..."
-       set scriptOut to (do shell script theScript) as string
-       set theCount to count of words in scriptOut
-       set i to 0
-       repeat until i = theCount
-               set i to i + 1
-               set defaultDelimiters to AppleScript's text item delimiters
-               set AppleScript's text item delimiters to {"."}
-               set theWords to the count of text items in word i of scriptOut
-               set z to 2
-               set the end of myList to (text items z thru theWords of word i of scriptOut) as string
-               set AppleScript's text item delimiters to defaultDelimiters
-       end repeat
-       set AppleScript's text item delimiters to {" "}
-       return myList
-end getSerial
 -- deal with uploading files to GPS receiver
 on uploadFile(fileList)
        -- create string for filters
index e715018e59a8ca17d19739f7ae482513a15774e3..2488ffa89eebd3770c42c83e0edb641b4c08e545 100644 (file)
                        DA206CF0015C4D9F03C91932,
                );
                perUserDictionary = {
-                       PBXPerProjectTemplateStateSaveDate = 97363921;
+                       PBXPerProjectTemplateStateSaveDate = 97476936;
+                       "PBXTemplateGeometry-F5314676015831810DCA290F" = {
+                               ContentSize = "{685, 434}";
+                               LeftSlideOut = {
+                                       Collapsed = NO;
+                                       Frame = "{{0, 23}, {685, 411}}";
+                                       Split0 = {
+                                               ActiveTab = 2;
+                                               Collapsed = NO;
+                                               Frame = "{{0, 0}, {685, 411}}";
+                                               Split0 = {
+                                                       Frame = "{{0, 221}, {685, 190}}";
+                                               };
+                                               SplitCount = 1;
+                                               Tab0 = {
+                                                       Debugger = {
+                                                               Collapsed = NO;
+                                                               Frame = "{{0, 0}, {952, 321}}";
+                                                               Split0 = {
+                                                                       Frame = "{{0, 24}, {952, 297}}";
+                                                                       Split0 = {
+                                                                               Frame = "{{0, 0}, {468, 297}}";
+                                                                       };
+                                                                       Split1 = {
+                                                                               DebugVariablesTableConfiguration = (
+                                                                                       Name,
+                                                                                       126.803,
+                                                                                       Value,
+                                                                                       150.074,
+                                                                                       Summary,
+                                                                                       172.123,
+                                                                               );
+                                                                               Frame = "{{477, 0}, {475, 297}}";
+                                                                       };
+                                                                       SplitCount = 2;
+                                                               };
+                                                               SplitCount = 1;
+                                                               Tab0 = {
+                                                                       Frame = "{{0, 0}, {100, 50}}";
+                                                               };
+                                                               Tab1 = {
+                                                                       Frame = "{{0, 0}, {100, 50}}";
+                                                               };
+                                                               TabCount = 2;
+                                                               TabsVisible = YES;
+                                                       };
+                                                       Frame = "{{0, 0}, {952, 321}}";
+                                                       LauncherConfigVersion = 7;
+                                               };
+                                               Tab1 = {
+                                                       Frame = "{{0, 0}, {781, 452}}";
+                                                       LauncherConfigVersion = 3;
+                                                       Runner = {
+                                                               Frame = "{{0, 0}, {781, 452}}";
+                                                       };
+                                               };
+                                               Tab2 = {
+                                                       BuildMessageFrame = "{{0, 0}, {687, 149}}";
+                                                       BuildTranscriptFrame = "{{0, 158}, {687, 59}}";
+                                                       Frame = "{{0, 0}, {685, 215}}";
+                                               };
+                                               Tab3 = {
+                                                       Frame = "{{0, 0}, {612, 295}}";
+                                               };
+                                               TabCount = 4;
+                                               TabsVisible = NO;
+                                       };
+                                       SplitCount = 1;
+                                       Tab0 = {
+                                               Frame = "{{0, 0}, {300, 533}}";
+                                               GroupTreeTableConfiguration = (
+                                                       SCMStatusColumn,
+                                                       22,
+                                                       TargetStatusColumn,
+                                                       18,
+                                                       MainColumn,
+                                                       245,
+                                               );
+                                       };
+                                       Tab1 = {
+                                               ClassesFrame = "{{0, 0}, {280, 398}}";
+                                               ClassesTreeTableConfiguration = (
+                                                       PBXBookColumnIdentifier,
+                                                       20,
+                                                       PBXClassColumnIdentifier,
+                                                       237,
+                                               );
+                                               Frame = "{{0, 0}, {278, 659}}";
+                                               MembersFrame = "{{0, 407}, {280, 252}}";
+                                               MembersTreeTableConfiguration = (
+                                                       PBXBookColumnIdentifier,
+                                                       20,
+                                                       PBXMethodColumnIdentifier,
+                                                       236,
+                                               );
+                                       };
+                                       Tab2 = {
+                                               Frame = "{{0, 0}, {200, 100}}";
+                                       };
+                                       Tab3 = {
+                                               Frame = "{{0, 0}, {200, 100}}";
+                                               TargetTableConfiguration = (
+                                                       ActiveObject,
+                                                       16,
+                                                       ObjectNames,
+                                                       202.296,
+                                               );
+                                       };
+                                       Tab4 = {
+                                               BreakpointsTreeTableConfiguration = (
+                                                       breakpointColumn,
+                                                       197,
+                                                       enabledColumn,
+                                                       31,
+                                               );
+                                               Frame = "{{0, 0}, {250, 100}}";
+                                       };
+                                       TabCount = 5;
+                                       TabsVisible = NO;
+                               };
+                               StatusViewVisible = YES;
+                               Template = F5314676015831810DCA290F;
+                               ToolbarVisible = YES;
+                               WindowLocation = "{7, 250}";
+                       };
+                       "PBXTemplateGeometry-F5534CB2020F3F8A0DCA290F" = {
+                               ContentSize = "{594, 303}";
+                               LeftSlideOut = {
+                                       Collapsed = NO;
+                                       Frame = "{{0, 23}, {594, 280}}";
+                                       Split0 = {
+                                               ActiveTab = 1;
+                                               Collapsed = YES;
+                                               Frame = "{{0, 0}, {594, 280}}";
+                                               Split0 = {
+                                                       Frame = "{{1e+06, 1e+06}, {594, 0}}";
+                                               };
+                                               SplitCount = 1;
+                                               Tab0 = {
+                                                       Debugger = {
+                                                               Collapsed = NO;
+                                                               Frame = "{{0, 0}, {804, 321}}";
+                                                               Split0 = {
+                                                                       Frame = "{{0, 24}, {804, 297}}";
+                                                                       Split0 = {
+                                                                               Frame = "{{0, 0}, {394, 297}}";
+                                                                       };
+                                                                       Split1 = {
+                                                                               DebugVariablesTableConfiguration = (
+                                                                                       Name,
+                                                                                       123,
+                                                                                       Value,
+                                                                                       85,
+                                                                                       Summary,
+                                                                                       167.123,
+                                                                               );
+                                                                               Frame = "{{403, 0}, {401, 297}}";
+                                                                       };
+                                                                       SplitCount = 2;
+                                                               };
+                                                               SplitCount = 1;
+                                                               Tab0 = {
+                                                                       Frame = "{{0, 0}, {100, 50}}";
+                                                               };
+                                                               Tab1 = {
+                                                                       Frame = "{{0, 0}, {100, 50}}";
+                                                               };
+                                                               TabCount = 2;
+                                                               TabsVisible = YES;
+                                                       };
+                                                       Frame = "{{0, 0}, {804, 321}}";
+                                                       LauncherConfigVersion = 7;
+                                               };
+                                               Tab1 = {
+                                                       Frame = "{{0, 0}, {594, 274}}";
+                                                       LauncherConfigVersion = 3;
+                                                       Runner = {
+                                                               Frame = "{{0, 0}, {594, 274}}";
+                                                       };
+                                               };
+                                               Tab2 = {
+                                                       BuildMessageFrame = "{{0, 0}, {806, 237}}";
+                                                       BuildTranscriptFrame = "{{0, 246}, {806, 3}}";
+                                                       Frame = "{{0, 0}, {804, 247}}";
+                                               };
+                                               Tab3 = {
+                                                       Frame = "{{0, 0}, {612, 295}}";
+                                               };
+                                               TabCount = 4;
+                                               TabsVisible = NO;
+                                       };
+                                       SplitCount = 1;
+                                       Tab0 = {
+                                               Frame = "{{0, 0}, {300, 533}}";
+                                               GroupTreeTableConfiguration = (
+                                                       SCMStatusColumn,
+                                                       22,
+                                                       TargetStatusColumn,
+                                                       18,
+                                                       MainColumn,
+                                                       245,
+                                               );
+                                       };
+                                       Tab1 = {
+                                               ClassesFrame = "{{0, 0}, {280, 398}}";
+                                               ClassesTreeTableConfiguration = (
+                                                       PBXBookColumnIdentifier,
+                                                       20,
+                                                       PBXClassColumnIdentifier,
+                                                       237,
+                                               );
+                                               Frame = "{{0, 0}, {278, 659}}";
+                                               MembersFrame = "{{0, 407}, {280, 252}}";
+                                               MembersTreeTableConfiguration = (
+                                                       PBXBookColumnIdentifier,
+                                                       20,
+                                                       PBXMethodColumnIdentifier,
+                                                       236,
+                                               );
+                                       };
+                                       Tab2 = {
+                                               Frame = "{{0, 0}, {200, 100}}";
+                                       };
+                                       Tab3 = {
+                                               Frame = "{{0, 0}, {200, 386}}";
+                                               TargetTableConfiguration = (
+                                                       ActiveObject,
+                                                       16,
+                                                       ObjectNames,
+                                                       202.296,
+                                               );
+                                       };
+                                       Tab4 = {
+                                               BreakpointsTreeTableConfiguration = (
+                                                       breakpointColumn,
+                                                       197,
+                                                       enabledColumn,
+                                                       31,
+                                               );
+                                               Frame = "{{0, 0}, {250, 386}}";
+                                       };
+                                       TabCount = 5;
+                                       TabsVisible = NO;
+                               };
+                               StatusViewVisible = YES;
+                               Template = F5534CB2020F3F8A0DCA290F;
+                               ToolbarVisible = YES;
+                               WindowLocation = "{4, 381}";
+                       };
                        PBXWorkspaceContents = (
                                {
                                        LeftSlideOut = {
                                                Split0 = {
                                                        Split0 = {
                                                                NavContent0 = {
-                                                                       bookmark = F50D59E705CDA7DE017C67C1;
+                                                                       bookmark = F5D9F71005CF63CD017C67C1;
                                                                        history = (
                                                                                F5F16EF60527D1B401A80064,
                                                                                F557060705C8B0C0017C67C1,
                                                                                F50EB4AE05CB231C017C67C1,
                                                                                F586ED0505CC1ED5017C67C1,
-                                                                               F5E2D67D05CDA550017C67C1,
                                                                                F5E2D67E05CDA550017C67C1,
                                                                                F5E2D67F05CDA550017C67C1,
                                                                                F5E2D68005CDA550017C67C1,
-                                                                               F5E2D68705CDA550017C67C1,
+                                                                               F5D9F70E05CF63CD017C67C1,
+                                                                               F58F331A05CF5079017C67C1,
                                                                        );
                                                                        prevStack = (
                                                                                F5F16EF80527D1B401A80064,
                                                                                F5E2D68405CDA550017C67C1,
                                                                                F5E2D68505CDA550017C67C1,
                                                                                F5E2D68605CDA550017C67C1,
+                                                                               F58F331C05CF5079017C67C1,
+                                                                               F58F331D05CF5079017C67C1,
+                                                                               F58F331E05CF5079017C67C1,
+                                                                               F58F331F05CF5079017C67C1,
+                                                                               F58F332005CF5079017C67C1,
+                                                                               F58F332105CF5079017C67C1,
+                                                                               F58F332205CF5079017C67C1,
+                                                                               F58F332305CF5079017C67C1,
+                                                                               F58F332405CF5079017C67C1,
+                                                                               F58F332505CF5079017C67C1,
+                                                                               F5D9F70F05CF63CD017C67C1,
                                                                        );
                                                                };
                                                                NavCount = 1;
                                                TabCount = 5;
                                        };
                                },
+                               {
+                                       LeftSlideOut = {
+                                               Split0 = {
+                                                       Split0 = {
+                                                               NavCount = 1;
+                                                               NavGeometry0 = {
+                                                                       Frame = "{{0, 0}, {594, 150}}";
+                                                                       NavBarVisible = YES;
+                                                               };
+                                                       };
+                                                       SplitCount = 1;
+                                                       Tab0 = {
+                                                               Debugger = {
+                                                                       Split0 = {
+                                                                               SplitCount = 2;
+                                                                       };
+                                                                       SplitCount = 1;
+                                                                       TabCount = 2;
+                                                               };
+                                                               LauncherConfigVersion = 7;
+                                                       };
+                                                       Tab1 = {
+                                                               LauncherConfigVersion = 3;
+                                                               Runner = {
+                                                               };
+                                                       };
+                                                       TabCount = 4;
+                                               };
+                                               SplitCount = 1;
+                                               Tab1 = {
+                                                       OptionsSetName = "Hierarchy, all classes";
+                                               };
+                                               TabCount = 5;
+                                       };
+                               },
                        );
                        PBXWorkspaceGeometries = (
                                {
                                        ToolbarVisible = YES;
                                        WindowLocation = "{7, 250}";
                                },
+                               {
+                                       ContentSize = "{594, 303}";
+                                       LeftSlideOut = {
+                                               Collapsed = NO;
+                                               Frame = "{{0, 23}, {594, 280}}";
+                                               Split0 = {
+                                                       ActiveTab = 1;
+                                                       Collapsed = YES;
+                                                       Frame = "{{0, 0}, {594, 280}}";
+                                                       Split0 = {
+                                                               Frame = "{{1e+06, 1e+06}, {594, 0}}";
+                                                       };
+                                                       SplitCount = 1;
+                                                       Tab0 = {
+                                                               Debugger = {
+                                                                       Collapsed = NO;
+                                                                       Frame = "{{0, 0}, {804, 321}}";
+                                                                       Split0 = {
+                                                                               Frame = "{{0, 24}, {804, 297}}";
+                                                                               Split0 = {
+                                                                                       Frame = "{{0, 0}, {394, 297}}";
+                                                                               };
+                                                                               Split1 = {
+                                                                                       DebugVariablesTableConfiguration = (
+                                                                                               Name,
+                                                                                               123,
+                                                                                               Value,
+                                                                                               85,
+                                                                                               Summary,
+                                                                                               167.123,
+                                                                                       );
+                                                                                       Frame = "{{403, 0}, {401, 297}}";
+                                                                               };
+                                                                               SplitCount = 2;
+                                                                       };
+                                                                       SplitCount = 1;
+                                                                       Tab0 = {
+                                                                               Frame = "{{0, 0}, {100, 50}}";
+                                                                       };
+                                                                       Tab1 = {
+                                                                               Frame = "{{0, 0}, {100, 50}}";
+                                                                       };
+                                                                       TabCount = 2;
+                                                                       TabsVisible = YES;
+                                                               };
+                                                               Frame = "{{0, 0}, {804, 321}}";
+                                                               LauncherConfigVersion = 7;
+                                                       };
+                                                       Tab1 = {
+                                                               Frame = "{{0, 0}, {594, 274}}";
+                                                               LauncherConfigVersion = 3;
+                                                               Runner = {
+                                                                       Frame = "{{0, 0}, {594, 274}}";
+                                                               };
+                                                       };
+                                                       Tab2 = {
+                                                               BuildMessageFrame = "{{0, 0}, {806, 237}}";
+                                                               BuildTranscriptFrame = "{{0, 246}, {806, 3}}";
+                                                               Frame = "{{0, 0}, {804, 247}}";
+                                                       };
+                                                       Tab3 = {
+                                                               Frame = "{{0, 0}, {612, 295}}";
+                                                       };
+                                                       TabCount = 4;
+                                                       TabsVisible = NO;
+                                               };
+                                               SplitCount = 1;
+                                               Tab0 = {
+                                                       Frame = "{{0, 0}, {300, 533}}";
+                                                       GroupTreeTableConfiguration = (
+                                                               TargetStatusColumn,
+                                                               18,
+                                                               MainColumn,
+                                                               267,
+                                                       );
+                                               };
+                                               Tab1 = {
+                                                       ClassesFrame = "{{0, 0}, {280, 398}}";
+                                                       ClassesTreeTableConfiguration = (
+                                                               PBXBookColumnIdentifier,
+                                                               20,
+                                                               PBXClassColumnIdentifier,
+                                                               237,
+                                                       );
+                                                       Frame = "{{0, 0}, {278, 659}}";
+                                                       MembersFrame = "{{0, 407}, {280, 252}}";
+                                                       MembersTreeTableConfiguration = (
+                                                               PBXBookColumnIdentifier,
+                                                               20,
+                                                               PBXMethodColumnIdentifier,
+                                                               236,
+                                                       );
+                                               };
+                                               Tab2 = {
+                                                       Frame = "{{0, 0}, {200, 100}}";
+                                               };
+                                               Tab3 = {
+                                                       Frame = "{{0, 0}, {200, 386}}";
+                                                       TargetTableConfiguration = (
+                                                               ActiveObject,
+                                                               16,
+                                                               ObjectNames,
+                                                               202.296,
+                                                       );
+                                               };
+                                               Tab4 = {
+                                                       BreakpointsTreeTableConfiguration = (
+                                                               breakpointColumn,
+                                                               197,
+                                                               enabledColumn,
+                                                               31,
+                                                       );
+                                                       Frame = "{{0, 0}, {250, 386}}";
+                                               };
+                                               TabCount = 5;
+                                               TabsVisible = NO;
+                                       };
+                                       StatusViewVisible = YES;
+                                       Template = F5534CB2020F3F8A0DCA290F;
+                                       ToolbarVisible = YES;
+                                       WindowLocation = "{4, 381}";
+                               },
                        );
-                       PBXWorkspaceStateSaveDate = 97363921;
+                       PBXWorkspaceStateSaveDate = 97476936;
                };
                perUserProjectItems = {
                        F508F40305A7AE8A01A80064 = F508F40305A7AE8A01A80064;
                        F508F40405A7AE8A01A80064 = F508F40405A7AE8A01A80064;
                        F508F40505A7AE8A01A80064 = F508F40505A7AE8A01A80064;
-                       F50D59E705CDA7DE017C67C1 = F50D59E705CDA7DE017C67C1;
                        F50EB4AE05CB231C017C67C1 = F50EB4AE05CB231C017C67C1;
                        F50EB4AF05CB231C017C67C1 = F50EB4AF05CB231C017C67C1;
                        F51C069F05C4C5B4017C67C1 = F51C069F05C4C5B4017C67C1;
                        F586ED1205CC1ED5017C67C1 = F586ED1205CC1ED5017C67C1;
                        F586ED1305CC1ED5017C67C1 = F586ED1305CC1ED5017C67C1;
                        F586ED1405CC1ED5017C67C1 = F586ED1405CC1ED5017C67C1;
+                       F58F331A05CF5079017C67C1 = F58F331A05CF5079017C67C1;
+                       F58F331C05CF5079017C67C1 = F58F331C05CF5079017C67C1;
+                       F58F331D05CF5079017C67C1 = F58F331D05CF5079017C67C1;
+                       F58F331E05CF5079017C67C1 = F58F331E05CF5079017C67C1;
+                       F58F331F05CF5079017C67C1 = F58F331F05CF5079017C67C1;
+                       F58F332005CF5079017C67C1 = F58F332005CF5079017C67C1;
+                       F58F332105CF5079017C67C1 = F58F332105CF5079017C67C1;
+                       F58F332205CF5079017C67C1 = F58F332205CF5079017C67C1;
+                       F58F332305CF5079017C67C1 = F58F332305CF5079017C67C1;
+                       F58F332405CF5079017C67C1 = F58F332405CF5079017C67C1;
+                       F58F332505CF5079017C67C1 = F58F332505CF5079017C67C1;
                        F5CCE1EA05CCCE05017C67C1 = F5CCE1EA05CCCE05017C67C1;
                        F5CCE1EB05CCCE05017C67C1 = F5CCE1EB05CCCE05017C67C1;
-                       F5E2D67D05CDA550017C67C1 = F5E2D67D05CDA550017C67C1;
+                       F5D9F70E05CF63CD017C67C1 = F5D9F70E05CF63CD017C67C1;
+                       F5D9F70F05CF63CD017C67C1 = F5D9F70F05CF63CD017C67C1;
+                       F5D9F71005CF63CD017C67C1 = F5D9F71005CF63CD017C67C1;
                        F5E2D67E05CDA550017C67C1 = F5E2D67E05CDA550017C67C1;
                        F5E2D67F05CDA550017C67C1 = F5E2D67F05CDA550017C67C1;
                        F5E2D68005CDA550017C67C1 = F5E2D68005CDA550017C67C1;
                        F5E2D68405CDA550017C67C1 = F5E2D68405CDA550017C67C1;
                        F5E2D68505CDA550017C67C1 = F5E2D68505CDA550017C67C1;
                        F5E2D68605CDA550017C67C1 = F5E2D68605CDA550017C67C1;
-                       F5E2D68705CDA550017C67C1 = F5E2D68705CDA550017C67C1;
                        F5F16EF60527D1B401A80064 = F5F16EF60527D1B401A80064;
                        F5F16EF80527D1B401A80064 = F5F16EF80527D1B401A80064;
                        F5F16EF90527D1B401A80064 = F5F16EF90527D1B401A80064;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 480";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 2445;
                vrLoc = 5977;
                isa = PBXTargetBookmark;
                trg = 29B97326FDCFA39411CA2CEA;
        };
-       F50D59E705CDA7DE017C67C1 = {
-               fRef = F586ED0005CB576C017C67C1;
-               isa = PBXTextBookmark;
-               name = "preferences.applescript: 73";
-               rLen = 0;
-               rLoc = 3400;
-               rType = 0;
-               vrLen = 2252;
-               vrLoc = 0;
-       };
        F50EB4AE05CB231C017C67C1 = {
                fRef = F508F3FF05A7A82F01A80064;
                isa = PBXTextBookmark;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 564";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
                vrLen = 1497;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 328";
                rLen = 0;
-               rLoc = 14218;
+               rLoc = 13341;
                rType = 0;
                vrLen = 1498;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 480";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1744;
                vrLoc = 189;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 190";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1958;
                vrLoc = 8259;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 188";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 2222;
                vrLoc = 8371;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 434";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1792;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 434";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1792;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 193";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1413;
                vrLoc = 2970;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 499";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1552;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 499";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1552;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 554";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
                vrLen = 1511;
                vrLoc = 14316;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 556";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
                vrLen = 1495;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 8";
                rLen = 0;
-               rLoc = 3400;
+               rLoc = 5906;
                rType = 0;
                vrLen = 157;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 245";
                rLen = 0;
-               rLoc = 11386;
+               rLoc = 10769;
                rType = 0;
                vrLen = 1811;
                vrLoc = 11141;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 11";
                rLen = 0;
-               rLoc = 3400;
+               rLoc = 5906;
                rType = 0;
                vrLen = 459;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 245";
                rLen = 0;
-               rLoc = 11386;
+               rLoc = 10769;
                rType = 0;
                vrLen = 1795;
                vrLoc = 11141;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 26";
                rLen = 0;
-               rLoc = 1462;
+               rLoc = 2231;
                rType = 0;
                vrLen = 1745;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 245";
                rLen = 0;
-               rLoc = 11386;
+               rLoc = 10769;
                rType = 0;
                vrLen = 1773;
                vrLoc = 9896;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 19";
                rLen = 0;
-               rLoc = 936;
+               rLoc = 1427;
                rType = 0;
                vrLen = 1970;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 528";
                rLen = 1109;
-               rLoc = 22625;
+               rLoc = 21317;
                rType = 0;
                vrLen = 2083;
                vrLoc = 20945;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 59";
                rLen = 0;
-               rLoc = 3400;
+               rLoc = 5906;
                rType = 0;
                vrLen = 2167;
                vrLoc = 616;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 543";
                rLen = 543;
-               rLoc = 23735;
+               rLoc = 22427;
                rType = 0;
                vrLen = 2083;
                vrLoc = 20945;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 73";
                rLen = 0;
-               rLoc = 3400;
+               rLoc = 5906;
                rType = 0;
                vrLen = 2426;
                vrLoc = 370;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 557";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
                vrLen = 2221;
                vrLoc = 21697;
                isa = PBXTargetBookmark;
                trg = 29B97326FDCFA39411CA2CEA;
        };
+       F58F331A05CF5079017C67C1 = {
+               fRef = DA206CF3015C4E8B03C91932;
+               isa = PBXTextBookmark;
+               name = "MacGPSBabel.applescript: 41";
+               rLen = 0;
+               rLoc = 1009;
+               rType = 0;
+               vrLen = 1835;
+               vrLoc = 282;
+       };
+       F58F331C05CF5079017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 73";
+               rLen = 0;
+               rLoc = 5906;
+               rType = 0;
+               vrLen = 2252;
+               vrLoc = 0;
+       };
+       F58F331D05CF5079017C67C1 = {
+               fRef = DA206CF3015C4E8B03C91932;
+               isa = PBXTextBookmark;
+               name = "MacGPSBabel.applescript: 577";
+               rLen = 0;
+               rLoc = 23133;
+               rType = 0;
+               vrLen = 1728;
+               vrLoc = 16243;
+       };
+       F58F331E05CF5079017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 73";
+               rLen = 0;
+               rLoc = 5906;
+               rType = 0;
+               vrLen = 2252;
+               vrLoc = 0;
+       };
+       F58F331F05CF5079017C67C1 = {
+               fRef = DA206CF3015C4E8B03C91932;
+               isa = PBXTextBookmark;
+               name = "MacGPSBabel.applescript: 577";
+               rLen = 0;
+               rLoc = 23133;
+               rType = 0;
+               vrLen = 1774;
+               vrLoc = 13079;
+       };
+       F58F332005CF5079017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 38";
+               rLen = 0;
+               rLoc = 2231;
+               rType = 0;
+               vrLen = 2277;
+               vrLoc = 1396;
+       };
+       F58F332105CF5079017C67C1 = {
+               fRef = DA206CF3015C4E8B03C91932;
+               isa = PBXTextBookmark;
+               name = "MacGPSBabel.applescript: 32";
+               rLen = 14;
+               rLoc = 995;
+               rType = 0;
+               vrLen = 2064;
+               vrLoc = 332;
+       };
+       F58F332205CF5079017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 53";
+               rLen = 0;
+               rLoc = 3429;
+               rType = 0;
+               vrLen = 2194;
+               vrLoc = 205;
+       };
+       F58F332305CF5079017C67C1 = {
+               fRef = DA206CF3015C4E8B03C91932;
+               isa = PBXTextBookmark;
+               name = "MacGPSBabel.applescript: 318";
+               rLen = 0;
+               rLoc = 13341;
+               rType = 0;
+               vrLen = 1766;
+               vrLoc = 13015;
+       };
+       F58F332405CF5079017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 38";
+               rLen = 0;
+               rLoc = 2176;
+               rType = 0;
+               vrLen = 2024;
+               vrLoc = 1122;
+       };
+       F58F332505CF5079017C67C1 = {
+               fRef = DA206CF3015C4E8B03C91932;
+               isa = PBXTextBookmark;
+               name = "MacGPSBabel.applescript: 41";
+               rLen = 0;
+               rLoc = 1009;
+               rType = 0;
+               vrLen = 1835;
+               vrLoc = 282;
+       };
        F5CCE1EA05CCCE05017C67C1 = {
                fRef = DA206CF3015C4E8B03C91932;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 556";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
                vrLen = 1497;
                vrLoc = 0;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 73";
                rLen = 0;
-               rLoc = 3400;
+               rLoc = 5906;
                rType = 0;
                vrLen = 2273;
                vrLoc = 0;
        };
-       F5E2D67D05CDA550017C67C1 = {
+       F5D9F70E05CF63CD017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 144";
+               rLen = 0;
+               rLoc = 5906;
+               rType = 0;
+               vrLen = 1911;
+               vrLoc = 3995;
+       };
+       F5D9F70F05CF63CD017C67C1 = {
+               fRef = F586ED0005CB576C017C67C1;
+               isa = PBXTextBookmark;
+               name = "preferences.applescript: 144";
+               rLen = 0;
+               rLoc = 5906;
+               rType = 0;
+               vrLen = 1911;
+               vrLoc = 3995;
+       };
+       F5D9F71005CF63CD017C67C1 = {
                fRef = DA206CF3015C4E8B03C91932;
                isa = PBXTextBookmark;
-               name = "MacGPSBabel.applescript: 577";
+               name = "MacGPSBabel.applescript: 543";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
-               vrLen = 1728;
-               vrLoc = 16243;
+               vrLen = 1598;
+               vrLoc = 13210;
        };
        F5E2D67E05CDA550017C67C1 = {
                fRef = F5E2D68A05CDA550017C67C1;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 577";
                rLen = 0;
-               rLoc = 24441;
+               rLoc = 23133;
                rType = 0;
                vrLen = 1728;
                vrLoc = 16243;
                isa = PBXTextBookmark;
                name = "preferences.applescript: 73";
                rLen = 0;
-               rLoc = 3400;
+               rLoc = 5906;
                rType = 0;
                vrLen = 2252;
                vrLoc = 0;
                glyphRangeLocation = 0;
                isa = DVDocBookmark;
        };
-       F5E2D68705CDA550017C67C1 = {
-               fRef = F586ED0005CB576C017C67C1;
-               isa = PBXTextBookmark;
-               name = "preferences.applescript: 73";
-               rLen = 0;
-               rLoc = 3400;
-               rType = 0;
-               vrLen = 2252;
-               vrLoc = 0;
-       };
        F5E2D68805CDA550017C67C1 = {
                isa = PBXFileReference;
                name = index.html;
                isa = PBXTextBookmark;
                name = "MacGPSBabel.applescript: 111";
                rLen = 0;
-               rLoc = 3813;
+               rLoc = 3196;
                rType = 0;
                vrLen = 1256;
                vrLoc = 3068;
index 789a7295548012a71a625888ab698f82f40c4578..743b59ab5f422b2e7d526188284de3618435dcb9 100644 (file)
@@ -1,18 +1,30 @@
 -- preferences.applescript
 -- MacGPSBabel
 
+-- This script deals mostly with reading and saving user defaults. Along the way, it also deals with getting the list of available serial ports.
+
 --  Created by Jeremy Atherton on Fri Jan 30 2004.
 --  Copyright (c) 2004 Jeremy Atherton.
 
+-- PROPERTIES --
 property startIndex : 0
 property startState : false
 
+-- EVENT HANDLERS --
+
 on will finish launching theObject
+       
+       -- make empty entries in user defaults
        make new default entry at end of default entries of user defaults with properties {name:"theInputType", contents:startIndex}
        make new default entry at end of default entries of user defaults with properties {name:"theOutputType", contents:startIndex}
        make new default entry at end of default entries of user defaults with properties {name:"gpsIN", contents:startState}
        make new default entry at end of default entries of user defaults with properties {name:"gpsOUT", contents:startState}
+       make new default entry at end of default entries of user defaults with properties {name:"gpsReceiver", contents:startIndex}
+       
+       -- read current user defaults
        my readSettings()
+       
+       -- deal with changes to MacGPSBabel window needed if any of the GPS check boxes are checked by default
        if state of button "GPSswitchIN" of window "MacGPSBabel" is equal to 1 then
                my gpsIN()
        end if
@@ -21,19 +33,41 @@ on will finish launching theObject
        end if
 end will finish launching
 
-on readSettings()
-       tell user defaults
-               set defaultInputIndex to contents of default entry "theInputType"
-               set defaultOutputIndex to contents of default entry "theOutputType"
-               set defaultgpsIN to contents of default entry "gpsIN" as boolean
-               set defaultgpsOUT to contents of default entry "gpsOUT" as boolean
-       end tell
-       set contents of popup button "inPop" of window "MacGPSBabel" to defaultInputIndex
-       set contents of popup button "outPop" of window "MacGPSBabel" to defaultOutputIndex
-       set state of button "GPSswitchIN" of window "MacGPSBabel" to defaultgpsIN
-       set state of button "GPSswitchOUT" of window "MacGPSBabel" to defaultgpsOUT
-end readSettings
+on will open theObject
+       if theObject is window "SelectGPS" then
+               -- get the list of available serial ports
+               set popList to my getSerial()
+               -- use popList to populate the drop-down menu
+               delete every menu item of menu of popup button "serialPop" of window "SelectGPS"
+               repeat with i in popList
+                       make new menu item at the end of menu items of menu of popup button "serialPop" of window "SelectGPS" with properties {title:i, enabled:true}
+               end repeat
+               
+               -- read user defaults for this window
+               tell user defaults
+                       set defaultgpsReceiver to contents of default entry "gpsReceiver"
+               end tell
+               set state of popup button "gpsPop" of window "SelectGPS" to defaultgpsReceiver
+               
+               -- hide MacGPSBabel window
+               set visible of window "MacGPSBabel" to false
+       end if
+end will open
+
+on will close theObject
+       if theObject is window "SelectGPS" then
+               -- store user defaults for this window
+               set newReceiverIndex to contents of popup button "gpsPop" of window "SelectGPS"
+               tell user defaults
+                       set contents of default entry "gpsReceiver" to newReceiverIndex
+               end tell
+               
+               -- unhide MacGPSBabel window
+               set visible of window "MacGPSBabel" to true
+       end if
+end will close
 
+-- store user defaults for MacGPSBabel window
 on clicked theObject
        if theObject is button "defaultsButton" of window "MacGPSBabel" then
                set newInputIndex to contents of popup button "inPop" of window "MacGPSBabel"
@@ -49,6 +83,23 @@ on clicked theObject
        end if
 end clicked
 
+-- HANDLERS --
+
+-- read user defaults
+on readSettings()
+       tell user defaults
+               set defaultInputIndex to contents of default entry "theInputType"
+               set defaultOutputIndex to contents of default entry "theOutputType"
+               set defaultgpsIN to contents of default entry "gpsIN" as boolean
+               set defaultgpsOUT to contents of default entry "gpsOUT" as boolean
+       end tell
+       set contents of popup button "inPop" of window "MacGPSBabel" to defaultInputIndex
+       set contents of popup button "outPop" of window "MacGPSBabel" to defaultOutputIndex
+       set state of button "GPSswitchIN" of window "MacGPSBabel" to defaultgpsIN
+       set state of button "GPSswitchOUT" of window "MacGPSBabel" to defaultgpsOUT
+end readSettings
+
+-- scripts for dealing with GPS checkboxes on MacGPSBabel window
 on gpsIN()
        if state of button "GPSswitchIN" of window "MacGPSBabel" = 1 then
                set enabled of button "selectButton" of window "MacGPSBabel" to false
@@ -70,4 +121,24 @@ on gpsOUT()
        else
                set enabled of popup button "outPop" of window "MacGPSBabel" to true
        end if
-end gpsOUT
\ No newline at end of file
+end gpsOUT
+
+-- find the serial ports
+on getSerial()
+       set myList to {}
+       set theScript to "cd /dev; ls | grep cu..."
+       set scriptOut to (do shell script theScript) as string
+       set theCount to count of words in scriptOut
+       set i to 0
+       repeat until i = theCount
+               set i to i + 1
+               set defaultDelimiters to AppleScript's text item delimiters
+               set AppleScript's text item delimiters to {"."}
+               set theWords to the count of text items in word i of scriptOut
+               set z to 2
+               set the end of myList to (text items z thru theWords of word i of scriptOut) as string
+               set AppleScript's text item delimiters to defaultDelimiters
+       end repeat
+       set AppleScript's text item delimiters to {" "}
+       return myList
+end getSerial
\ No newline at end of file